package com.thinkingstar.iads.cs.sys.enumerate;

import java.util.ArrayList;
import java.util.List;

/**
 * 数据类型枚举类
 * @author Administrator
 *
 */
public enum CODE_TYPE {
	
	BOOLEAN("布尔型","boolean"),
	INT("整型","int"),
	VARCHAR("字符型","varchar"),
	FLOAT("单精度浮点型","float"),
	DOUBLE("双精度浮点型","double"),
	LONG("长整型","long"),
	DATE("日期类型","date"),
	TEXT("长字符型","text");
	
	private final String desc;
	private final String code;
	
	private CODE_TYPE(String desc, String code) {
		this.code = code;
		this.desc = desc;
	}

	public String getDesc() {
		return desc;
	}

	public String getCode() {
		return code;
	}
	
	public static List<CODE_TYPE> getAllCodeType(){
		List <CODE_TYPE> list = new ArrayList<>();
		list.add(BOOLEAN);
		list.add(INT);
		list.add(VARCHAR);
		list.add(FLOAT);
		list.add(DOUBLE);
		list.add(LONG);
		list.add(TEXT);
		list.add(DATE);
		return list;
	}
}
